<?php
/**
 * Short Description  
 *
 * Long Description 
 *
 * @copyright 
 * @version   $Id: Bootstrap.php 7 2011-04-06 09:37:23Z sandeep.manne@gmail.com $
 */

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
	private $_cache = null;
	
	public function run()
	{
		$this->_beforeRun();
		parent::run();
		$this->_afterRun();
	}
	
	/**
	 * Before running bootstrap
	 */
	private function _beforeRun()
	{
		// Register Action Helpers
		Zend_Controller_Action_HelperBroker::addPrefix('Core_Helper');
		//Zend_Layout::startMvc();
		$frontController = Zend_Controller_Front::getInstance();
		$router = $frontController->getRouter();
		$router->addConfig(App::getRoutes(), 'routes');
		
		//Zend_Db Caching
		Zend_Db_Table_Abstract::setDefaultMetadataCache(App::getCache());
	}
	
	/**
	 * After running bootstrap
	 */
	private function _afterRun()
	{
	}
	
}
